﻿@model Bootstrap_Project.Web.Models.RegisterModel
@{
    ViewBag.Title = "Register";
}

@if (!Url.RequestContext.HttpContext.Request.QueryString.AllKeys.Contains("ReturnUrl"))
{
    {
        Layout = "~/Views/Shared/_Layout_lite.cshtml";
    }
}
else
{
    {
        Layout = "~/Views/Shared/_Layout.cshtml";
    }
}

<div class="modal-header">
    <!--<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>-->
    <h4 class="modal-title" id="regLabel">@ViewBag.Title. <small>Создание новой учетной записи</small></h4>
</div>

<div class="container-fluid">
    <div class="row voffset">
        <div class="col-md-8">
            @using (Html.BeginForm(null, null, FormMethod.Post, new { @class = "form-horizontal well", role = "form" }))
            {
                @Html.AntiForgeryToken()
                @Html.ValidationSummary()

                <fieldset>
                    <legend>Форма регистрации</legend>
                    <div class="form-group">
                        @Html.LabelFor(m => m.UserName, new { @class = "col-sm-5 control-label" })
                        <div class="col-sm-6">
                            @Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
                            @Html.ValidationMessageFor(m => m.UserName)
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(m => m.Password, new { @class = "col-sm-5 control-label" })
                        <div class="col-sm-6">
                            @Html.PasswordFor(m => m.Password, new { @class = "form-control" })
                            @Html.ValidationMessageFor(m => m.Password)
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-sm-5 control-label" })
                        <div class="col-sm-6">
                            @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
                            @Html.ValidationMessageFor(m => m.ConfirmPassword)
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(m => m.Email, new { @class = "col-sm-5 control-label" })
                        <div class="col-sm-6">
                            @Html.TextBoxFor(m => m.Email, new { type = "email", @class = "form-control" })
                            @Html.ValidationMessageFor(m => m.Email)
                        </div>
                    </div>
                    <input type="submit" class="btn btn-primary" value="Регистрация" />
                </fieldset>
            }
        </div>
        <div class="col-md-4">
            @Html.Action("ExternalLoginsList", new { ReturnUrl = ViewBag.ReturnUrl })
        </div>
    </div>
</div>
